<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>

<body>
    <div id="app">
        <div v-if="score>=90">优秀</div>
        <div v-else-if="score<90&&score>= 80 ">良好</div>
        <div v-else-if="score<80&&score>60">一般</div>
        <div v-else>比较差</div>
        <div v-show="flag">测试</div>
        <button v-on:click="handle">切换</button>
    </div>
    <!-- 
        v-if 控制元素是否渲染到页面
        v-show 控制元素显示隐藏（已经渲染到了页面）
     -->
    <script src="./vue.js"></script>
    <script>
        var vm = new Vue({
            el: "#app",
            data: {
                score: 88,
                flag: false,
            },
            methods: {
                handle: function() {
                    this.flag = !this.flag;
                },
            },
        });
    </script>
</body>

</html>